Patent Document 1 discloses a semiconductor device having a diode element. This semiconductor device includes an n type semiconductor substrate, an n type epitaxial layer formed on the semiconductor substrate, an n type semiconductor region formed in the n type epitaxial layer, a p type semiconductor region formed on the n type semiconductor region, an insulating film formed on the n type epitaxial layer, an anode electrode penetrating through the insulating film and connected to the p type semiconductor region, and a cathode electrode connected to a rear surface of the semiconductor substrate.